@extends('Layout/base')

@section('header-js')

<link rel="stylesheet" type="text/css" href="{{ asset('css/base.css') }}">
<link rel="stylesheet" type="text/css" href="{{ asset('css/member.css') }}">


<link rel="stylesheet" type="text/css" href="{{ asset('css/home.css') }}">
<script type="text/javascript" src="{{ asset('js/js-tab.js') }}"></script>

    <script>
         $(function(){

             $("#H-table li").each(function(i){
                 $(this).click((function(k){
                     var _index = k;
                     return function(){
                         $(this).addClass("cur").siblings().removeClass("cur");
                         $(".H-over").hide();
                         $(".H-over:eq(" + _index + ")").show();
                     }
                 })(i));
             });
             $("#H-table1 li").each(function(i){
                 $(this).click((function(k){
                     var _index = k;
                     return function(){
                         $(this).addClass("cur").siblings().removeClass("cur");
                         $(".H-over1").hide();
                         $(".H-over1:eq(" + _index + ")").show();
                     }
                 })(i));
             });
         });

         function pay() {
             $.ajax({
                 dataType: 'json',
                 type: 'post',
                 url: '{{ route("orderpay") }}',
                 data: "_token={{ csrf_token() }}&oid=" + {{ $orderId }},
                 success: function (data) {
                     if (data.status == 404) {
                         alert(data.msg);
                     } else {
                         alert(data.msg);
                         location.href = '/Home/orderlist';
                     }
                 }
             });
         }
     </script>


 </head>
 @endsection


@section('content')
<!-- 订单提交成功 begin-->
<section>
    <div class="containers">
        <div class="pc-order-title"><h3>您的订单已提交成功!</h3></div>
        <div class="pc-border">
            <div class="pc-order-text">
                <p>订单提交成功，请您尽快付款！   订单号 ：<em>{{ $o_num }}</em></p>
                <p class="reds">请您在提交订单后30分钟内完成付款，促销商品请5分钟内支付，否则订单将自动取消。</em></p>
            </div>
            <div class="pc-line"></div>
            <div class="pc-order-text">
                <p>商品名称：{{ $names }}</p>
                <p>收货地址：{{ $getMsg['ssq'].$getMsg['address'] }} 收货人：{{ $getMsg['getname'] }} {{ $getMsg['phone'] }}</p>
            </div>
        </div>
    </div>
</section>
<!-- 订单提交成功 End-->

<div class="pc-buying clearfix" style="margin-top:30px">
    <div class="time-list time-list-w fl">
        <div class="time-title">
            <ul class="brand-tab H-table H-table-shop clearfix fl" id="H-table">
                <li class="cur"><a href="javascript:void(0);" class="cur">支付宝</a></li>
                <li><a href="javascript:void(0);">储蓄卡</a></li>
                <li><a href="javascript:void(0);">给我打钱</a></li>
            </ul>
            <span class="pc-order-price">总价：￥{{ $totalPay }}</span>
        </div>
        <div class="time-border time-border-h clearfix">
            <div class="time-border-list pc-shop-clear pc-order-clear H-over clearfix">
                <ul class="pc-order-list clearfix">
                    <li style="width:300px;height:200px"><a href="javascript:;"><img src="{{ asset('images/zhifubao.jpg') }}"></a> </li>
                </ul>
            </div>
            <div style="display:none;" class="time-border-list  pc-shop-clear pc-order-clear H-over clearfix">
                <ul class="pc-order-list">
                <li style="width:300px;height:200px"><a href="javascript:;"><img src="{{ asset('images/wangyin.jpg') }}"></a> </li>
                </ul>
            </div>
            <div style="display:none;" class="time-border-list  pc-shop-clear pc-order-clear H-over clearfix">
                <ul class="pc-order-list">
                <li style="width:296px;height:293px"><a href="javascript:;"><img src="{{ asset('images/wt1ao.png') }}"></a> </li>
                </ul>
            </div>

            <div class="pc-order-go"><a href="#" onclick="pay()">确认支付</a></div>
        </div>
    </div>
</div>
@endsection
<!--- footer begin-->

@section('foot-js')

@endsection
<!-- footer End -->
